package org.qing.cloud.common.security.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.qing.cloud.common.security.component.SysResourceServerAutoConfiguration;
import org.qing.cloud.common.security.component.SysResourceServerTokenRelayAutoConfiguration;
import org.qing.cloud.common.security.component.SysSecurityBeanDefinitionRegistrar;
import org.qing.cloud.common.security.feign.SysFeignClientConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

/**
 * 资源服务注解
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({ SysResourceServerAutoConfiguration.class, SysSecurityBeanDefinitionRegistrar.class,
		SysResourceServerTokenRelayAutoConfiguration.class, SysFeignClientConfiguration.class })
public @interface EnableSysResourceServer {

}
